.class public Lcom/example/m6wmr/GiftActivity;
.super Landroid/app/Activity;
.source "GiftActivity.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/example/m6wmr/GiftActivity$viewClickListener;
    }
.end annotation


# static fields
.field public static GiftAc:Lcom/example/m6wmr/GiftActivity;


# instance fields
.field private areaid:Ljava/lang/String;

.field private areals:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lbean/AreaBean;",
            ">;"
        }
    .end annotation
.end field

.field private cursor:Landroid/database/Cursor;

.field private db:Landroid/database/sqlite/SQLiteDatabase;

.field private giftliststr:Ljava/lang/String;

.field private goint:I

.field public h:Landroid/os/Handler;

.field private helper:Ldbclass/DBOpenHelper;

.field m:Lmyapp/MyApp;

.field private mPopupWindow:Landroid/widget/PopupWindow;

.field private mPopupWindowHeight:I

.field private mPopupWindowWidth:I

.field private mScreenHeight:I

.field private mScreenWidth:I

.field private mcontext:Landroid/content/Context;

.field myLoginView:Landroid/view/View;

.field private nowgiftid:Ljava/lang/String;

.field private nowgiftname:Ljava/lang/String;

.field private nowgiftstock:Ljava/lang/String;

.field publayout:Landroid/widget/LinearLayout;

.field shoplayout:Landroid/widget/LinearLayout;

.field private shoptypels:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lbean/ShoptypeBean;",
            ">;"
        }
    .end annotation
.end field

.field private spbd:Ldata/ShopData;

.field waitLoginView:Landroid/view/View;


# direct methods
.method public constructor <init>()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 52
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 53
    const-string v0, ""

    iput-object v0, p0, Lcom/example/m6wmr/GiftActivity;->areaid:Ljava/lang/String;

    .line 54
    iput-object v1, p0, Lcom/example/m6wmr/GiftActivity;->m:Lmyapp/MyApp;

    .line 57
    iput-object v1, p0, Lcom/example/m6wmr/GiftActivity;->h:Landroid/os/Handler;

    .line 58
    iput-object v1, p0, Lcom/example/m6wmr/GiftActivity;->shoplayout:Landroid/widget/LinearLayout;

    .line 71
    iput-object v1, p0, Lcom/example/m6wmr/GiftActivity;->cursor:Landroid/database/Cursor;

    .line 73
    const-string v0, ""

    iput-object v0, p0, Lcom/example/m6wmr/GiftActivity;->giftliststr:Ljava/lang/String;

    .line 76
    const/4 v0, 0x0

    iput v0, p0, Lcom/example/m6wmr/GiftActivity;->goint:I

    .line 77
    const-string v0, ""

    iput-object v0, p0, Lcom/example/m6wmr/GiftActivity;->nowgiftname:Ljava/lang/String;

    .line 78
    const-string v0, ""

    iput-object v0, p0, Lcom/example/m6wmr/GiftActivity;->nowgiftid:Ljava/lang/String;

    .line 79
    const-string v0, ""

    iput-object v0, p0, Lcom/example/m6wmr/GiftActivity;->nowgiftstock:Ljava/lang/String;

    .line 52
    return-void
.end method

.method static synthetic access$0(Lcom/example/m6wmr/GiftActivity;Ljava/lang/String;)V
    .locals 0

    .prologue
    .line 77
    iput-object p1, p0, Lcom/example/m6wmr/GiftActivity;->nowgiftname:Ljava/lang/String;

    return-void
.end method

.method static synthetic access$1(Lcom/example/m6wmr/GiftActivity;Ljava/lang/String;)V
    .locals 0

    .prologue
    .line 78
    iput-object p1, p0, Lcom/example/m6wmr/GiftActivity;->nowgiftid:Ljava/lang/String;

    return-void
.end method

.method static synthetic access$2(Lcom/example/m6wmr/GiftActivity;Ljava/lang/String;)V
    .locals 0

    .prologue
    .line 79
    iput-object p1, p0, Lcom/example/m6wmr/GiftActivity;->nowgiftstock:Ljava/lang/String;

    return-void
.end method

.method static synthetic access$3(Lcom/example/m6wmr/GiftActivity;)Landroid/content/Context;
    .locals 1

    .prologue
    .line 56
    iget-object v0, p0, Lcom/example/m6wmr/GiftActivity;->mcontext:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic access$4(Lcom/example/m6wmr/GiftActivity;I)V
    .locals 0

    .prologue
    .line 76
    iput p1, p0, Lcom/example/m6wmr/GiftActivity;->goint:I

    return-void
.end method

.method static synthetic access$5(Lcom/example/m6wmr/GiftActivity;)Landroid/widget/PopupWindow;
    .locals 1

    .prologue
    .line 61
    iget-object v0, p0, Lcom/example/m6wmr/GiftActivity;->mPopupWindow:Landroid/widget/PopupWindow;

    return-object v0
.end method

.method static synthetic access$6(Lcom/example/m6wmr/GiftActivity;)Ljava/lang/String;
    .locals 1

    .prologue
    .line 79
    iget-object v0, p0, Lcom/example/m6wmr/GiftActivity;->nowgiftstock:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$7(Lcom/example/m6wmr/GiftActivity;)I
    .locals 1

    .prologue
    .line 76
    iget v0, p0, Lcom/example/m6wmr/GiftActivity;->goint:I

    return v0
.end method

.method static synthetic access$8(Lcom/example/m6wmr/GiftActivity;Ljava/lang/String;)V
    .locals 0

    .prologue
    .line 73
    iput-object p1, p0, Lcom/example/m6wmr/GiftActivity;->giftliststr:Ljava/lang/String;

    return-void
.end method

.method static synthetic access$9(Lcom/example/m6wmr/GiftActivity;)Ljava/lang/String;
    .locals 1

    .prologue
    .line 78
    iget-object v0, p0, Lcom/example/m6wmr/GiftActivity;->nowgiftid:Ljava/lang/String;

    return-object v0
.end method


# virtual methods
.method public Inishop()V
    .locals 0

    .prologue
    .line 388
    return-void
.end method

.method public bindbtn()V
    .locals 3

    .prologue
    .line 366
    const v2, 0x7f0c0001

    invoke-virtual {p0, v2}, Lcom/example/m6wmr/GiftActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    .line 367
    .local v0, "closebtn":Landroid/widget/ImageView;
    new-instance v2, Lcom/example/m6wmr/GiftActivity$7;

    invoke-direct {v2, p0}, Lcom/example/m6wmr/GiftActivity$7;-><init>(Lcom/example/m6wmr/GiftActivity;)V

    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 381
    const v2, 0x7f0c0016

    invoke-virtual {p0, v2}, Lcom/example/m6wmr/GiftActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Lcom/example/location/BottomMenu;

    .line 382
    .local v1, "menu":Lcom/example/location/BottomMenu;
    const-string v2, "person"

    invoke-virtual {v1, v2}, Lcom/example/location/BottomMenu;->SetOn(Ljava/lang/String;)V

    .line 383
    return-void
.end method

.method public getShopSource()Z
    .locals 1

    .prologue
    .line 392
    new-instance v0, Lcom/example/m6wmr/GiftActivity$8;

    invoke-direct {v0, p0}, Lcom/example/m6wmr/GiftActivity$8;-><init>(Lcom/example/m6wmr/GiftActivity;)V

    .line 450
    invoke-virtual {v0}, Lcom/example/m6wmr/GiftActivity$8;->start()V

    .line 451
    const/4 v0, 0x0

    return v0
.end method

.method public giftchangeSource()Z
    .locals 1

    .prologue
    .line 456
    new-instance v0, Lcom/example/m6wmr/GiftActivity$9;

    invoke-direct {v0, p0}, Lcom/example/m6wmr/GiftActivity$9;-><init>(Lcom/example/m6wmr/GiftActivity;)V

    .line 517
    invoke-virtual {v0}, Lcom/example/m6wmr/GiftActivity$9;->start()V

    .line 518
    const/4 v0, 0x0

    return v0
.end method

.method public loadgiftdata()V
    .locals 23

    .prologue
    .line 181
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/example/m6wmr/GiftActivity;->publayout:Landroid/widget/LinearLayout;

    move-object/from16 v18, v0

    invoke-virtual/range {v18 .. v18}, Landroid/widget/LinearLayout;->removeAllViews()V

    .line 182
    new-instance v13, LPlugclass/ImageLoader;

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/example/m6wmr/GiftActivity;->mcontext:Landroid/content/Context;

    move-object/from16 v18, v0

    move-object/from16 v0, v18

    invoke-direct {v13, v0}, LPlugclass/ImageLoader;-><init>(Landroid/content/Context;)V

    .line 183
    .local v13, "imageLoader":LPlugclass/ImageLoader;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/example/m6wmr/GiftActivity;->giftliststr:Ljava/lang/String;

    move-object/from16 v18, v0

    const-string v19, ""

    invoke-virtual/range {v18 .. v19}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v18

    if-eqz v18, :cond_1

    .line 184
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/example/m6wmr/GiftActivity;->mcontext:Landroid/content/Context;

    move-object/from16 v18, v0

    const v19, 0x7f03007d

    const/16 v20, 0x0

    invoke-static/range {v18 .. v20}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v17

    .line 185
    .local v17, "tempview":Landroid/view/View;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/example/m6wmr/GiftActivity;->publayout:Landroid/widget/LinearLayout;

    move-object/from16 v18, v0

    move-object/from16 v0, v18

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 227
    .end local v17    # "tempview":Landroid/view/View;
    :cond_0
    :goto_0
    return-void

    .line 188
    :cond_1
    :try_start_0
    new-instance v15, Lorg/json/JSONObject;

    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/example/m6wmr/GiftActivity;->giftliststr:Ljava/lang/String;

    move-object/from16 v18, v0

    move-object/from16 v0, v18

    invoke-direct {v15, v0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 189
    .local v15, "json":Lorg/json/JSONObject;
    const-string v18, "msg"

    move-object/from16 v0, v18

    invoke-virtual {v15, v0}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v14

    .line 190
    .local v14, "jarray":Lorg/json/JSONArray;
    const/4 v11, 0x0

    .local v11, "i":I
    :goto_1
    invoke-virtual {v14}, Lorg/json/JSONArray;->length()I

    move-result v18

    move/from16 v0, v18

    if-ge v11, v0, :cond_0

    .line 193
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/example/m6wmr/GiftActivity;->mcontext:Landroid/content/Context;

    move-object/from16 v18, v0

    const v19, 0x7f030068

    const/16 v20, 0x0

    invoke-static/range {v18 .. v20}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v17

    .line 194
    .restart local v17    # "tempview":Landroid/view/View;
    invoke-virtual {v14, v11}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v18

    const-string v19, "id"

    invoke-virtual/range {v18 .. v19}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v18

    invoke-static/range {v18 .. v18}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;

    move-result-object v18

    invoke-virtual/range {v18 .. v18}, Ljava/lang/Integer;->intValue()I

    move-result v18

    invoke-virtual/range {v17 .. v18}, Landroid/view/View;->setId(I)V

    .line 196
    const v18, 0x7f0c0260

    invoke-virtual/range {v17 .. v18}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v10

    check-cast v10, Landroid/widget/TextView;

    .line 197
    .local v10, "gifttitle":Landroid/widget/TextView;
    invoke-virtual {v14, v11}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v18

    const-string v19, "title"

    invoke-virtual/range {v18 .. v19}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v18

    move-object/from16 v0, v18

    invoke-virtual {v10, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 199
    const v18, 0x7f0c0275

    invoke-virtual/range {v17 .. v18}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v8

    check-cast v8, Landroid/widget/TextView;

    .line 200
    .local v8, "giftscore":Landroid/widget/TextView;
    invoke-virtual {v14, v11}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v18

    const-string v19, "score"

    invoke-virtual/range {v18 .. v19}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v18

    move-object/from16 v0, v18

    invoke-virtual {v8, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 202
    const v18, 0x7f0c0276

    invoke-virtual/range {v17 .. v18}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v9

    check-cast v9, Landroid/widget/TextView;

    .line 203
    .local v9, "giftstock":Landroid/widget/TextView;
    new-instance v18, Ljava/lang/StringBuilder;

    const-string v19, "\u793c\u54c1\u5e93\u5b58:"

    invoke-direct/range {v18 .. v19}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v14, v11}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v19

    const-string v20, "stock"

    invoke-virtual/range {v19 .. v20}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v19

    invoke-virtual/range {v18 .. v19}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v18

    invoke-virtual/range {v18 .. v18}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v18

    move-object/from16 v0, v18

    invoke-virtual {v9, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 205
    const v18, 0x7f0c0274

    invoke-virtual/range {v17 .. v18}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v12

    .line 204
    check-cast v12, Landroid/widget/ImageView;

    .line 206
    .local v12, "im5":Landroid/widget/ImageView;
    invoke-virtual {v14, v11}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v18

    const-string v19, "img"

    invoke-virtual/range {v18 .. v19}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v16

    .line 207
    .local v16, "strurl":Ljava/lang/String;
    move-object/from16 v0, v16

    invoke-virtual {v13, v0, v12}, LPlugclass/ImageLoader;->DisplayImage(Ljava/lang/String;Landroid/widget/ImageView;)V

    .line 209
    const v18, 0x7f0c0277

    invoke-virtual/range {v17 .. v18}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/TextView;

    .line 211
    .local v7, "exchangegift":Landroid/widget/TextView;
    invoke-virtual {v14, v11}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v18

    const-string v19, "stock"

    invoke-virtual/range {v18 .. v19}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v18

    invoke-static/range {v18 .. v18}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;

    move-result-object v18

    invoke-virtual/range {v18 .. v18}, Ljava/lang/Integer;->intValue()I

    move-result v5

    .line 212
    .local v5, "checkshu":I
    if-lez v5, :cond_2

    .line 213
    new-instance v18, Lcom/example/m6wmr/GiftActivity$viewClickListener;

    invoke-virtual {v14, v11}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v19

    const-string v20, "id"

    invoke-virtual/range {v19 .. v20}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v19

    invoke-virtual {v14, v11}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v20

    const-string v21, "stock"

    invoke-virtual/range {v20 .. v21}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v20

    invoke-virtual {v14, v11}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v21

    const-string v22, "title"

    invoke-virtual/range {v21 .. v22}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v21

    move-object/from16 v0, v18

    move-object/from16 v1, p0

    move-object/from16 v2, v19

    move-object/from16 v3, v20

    move-object/from16 v4, v21

    invoke-direct {v0, v1, v2, v3, v4}, Lcom/example/m6wmr/GiftActivity$viewClickListener;-><init>(Lcom/example/m6wmr/GiftActivity;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    move-object/from16 v0, v18

    invoke-virtual {v7, v0}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 217
    :goto_2
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/example/m6wmr/GiftActivity;->publayout:Landroid/widget/LinearLayout;

    move-object/from16 v18, v0

    move-object/from16 v0, v18

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 190
    add-int/lit8 v11, v11, 0x1

    goto/16 :goto_1

    .line 215
    :cond_2
    const-string v18, "\u5151\u6362\u5b8c\u6bd5"

    move-object/from16 v0, v18

    invoke-virtual {v7, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_2

    .line 220
    .end local v5    # "checkshu":I
    .end local v7    # "exchangegift":Landroid/widget/TextView;
    .end local v8    # "giftscore":Landroid/widget/TextView;
    .end local v9    # "giftstock":Landroid/widget/TextView;
    .end local v10    # "gifttitle":Landroid/widget/TextView;
    .end local v11    # "i":I
    .end local v12    # "im5":Landroid/widget/ImageView;
    .end local v14    # "jarray":Lorg/json/JSONArray;
    .end local v15    # "json":Lorg/json/JSONObject;
    .end local v16    # "strurl":Ljava/lang/String;
    .end local v17    # "tempview":Landroid/view/View;
    :catch_0
    move-exception v6

    .line 222
    .local v6, "e":Lorg/json/JSONException;
    invoke-virtual {v6}, Lorg/json/JSONException;->printStackTrace()V

    .line 223
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/example/m6wmr/GiftActivity;->mcontext:Landroid/content/Context;

    move-object/from16 v18, v0

    const v19, 0x7f03007d

    const/16 v20, 0x0

    invoke-static/range {v18 .. v20}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v17

    .line 224
    .restart local v17    # "tempview":Landroid/view/View;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/example/m6wmr/GiftActivity;->publayout:Landroid/widget/LinearLayout;

    move-object/from16 v18, v0

    move-object/from16 v0, v18

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    goto/16 :goto_0
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 5
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    .line 83
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 84
    const v3, 0x7f030004

    invoke-virtual {p0, v3}, Lcom/example/m6wmr/GiftActivity;->setContentView(I)V

    .line 86
    invoke-virtual {p0}, Lcom/example/m6wmr/GiftActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v3

    check-cast v3, Lmyapp/MyApp;

    iput-object v3, p0, Lcom/example/m6wmr/GiftActivity;->m:Lmyapp/MyApp;

    .line 87
    iget-object v3, p0, Lcom/example/m6wmr/GiftActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v3}, Lmyapp/MyApp;->getActivity()Ljava/util/ArrayList;

    move-result-object v0

    .line 88
    .local v0, "activityList":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Landroid/app/Activity;>;"
    invoke-virtual {v0, p0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 89
    iput-object p0, p0, Lcom/example/m6wmr/GiftActivity;->mcontext:Landroid/content/Context;

    .line 90
    sput-object p0, Lcom/example/m6wmr/GiftActivity;->GiftAc:Lcom/example/m6wmr/GiftActivity;

    .line 91
    new-instance v3, Ldbclass/DBOpenHelper;

    iget-object v4, p0, Lcom/example/m6wmr/GiftActivity;->mcontext:Landroid/content/Context;

    invoke-direct {v3, v4}, Ldbclass/DBOpenHelper;-><init>(Landroid/content/Context;)V

    iput-object v3, p0, Lcom/example/m6wmr/GiftActivity;->helper:Ldbclass/DBOpenHelper;

    .line 92
    iget-object v3, p0, Lcom/example/m6wmr/GiftActivity;->helper:Ldbclass/DBOpenHelper;

    invoke-virtual {v3}, Ldbclass/DBOpenHelper;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v3

    iput-object v3, p0, Lcom/example/m6wmr/GiftActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    .line 93
    const/4 v3, 0x0

    iput-object v3, p0, Lcom/example/m6wmr/GiftActivity;->waitLoginView:Landroid/view/View;

    .line 96
    const/high16 v3, 0x7f0c0000

    invoke-virtual {p0, v3}, Lcom/example/m6wmr/GiftActivity;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/LinearLayout;

    .line 97
    .local v2, "top":Landroid/widget/LinearLayout;
    iget-object v3, p0, Lcom/example/m6wmr/GiftActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v3}, Lmyapp/MyApp;->getAppcolor()Ljava/lang/String;

    move-result-object v3

    const-string v4, "1"

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 98
    const v3, 0x7f070026

    invoke-virtual {v2, v3}, Landroid/widget/LinearLayout;->setBackgroundResource(I)V

    .line 101
    :cond_0
    new-instance v3, Lcom/example/m6wmr/GiftActivity$1;

    invoke-direct {v3, p0}, Lcom/example/m6wmr/GiftActivity$1;-><init>(Lcom/example/m6wmr/GiftActivity;)V

    iput-object v3, p0, Lcom/example/m6wmr/GiftActivity;->h:Landroid/os/Handler;

    .line 152
    invoke-virtual {p0}, Lcom/example/m6wmr/GiftActivity;->bindbtn()V

    .line 154
    const v3, 0x7f0c00ca

    invoke-virtual {p0, v3}, Lcom/example/m6wmr/GiftActivity;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/LinearLayout;

    iput-object v3, p0, Lcom/example/m6wmr/GiftActivity;->publayout:Landroid/widget/LinearLayout;

    .line 155
    const v3, 0x7f0c0009

    invoke-virtual {p0, v3}, Lcom/example/m6wmr/GiftActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    .line 156
    .local v1, "titlename":Landroid/widget/TextView;
    const-string v3, "\u793c\u54c1\u5151\u6362333"

    invoke-virtual {v1, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 159
    return-void
.end method

.method protected onDestroy()V
    .locals 1

    .prologue
    .line 538
    invoke-super {p0}, Landroid/app/Activity;->onDestroy()V

    .line 541
    iget-object v0, p0, Lcom/example/m6wmr/GiftActivity;->mPopupWindow:Landroid/widget/PopupWindow;

    if-eqz v0, :cond_0

    .line 542
    iget-object v0, p0, Lcom/example/m6wmr/GiftActivity;->mPopupWindow:Landroid/widget/PopupWindow;

    invoke-virtual {v0}, Landroid/widget/PopupWindow;->dismiss()V

    .line 544
    :cond_0
    iget-object v0, p0, Lcom/example/m6wmr/GiftActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    if-eqz v0, :cond_1

    .line 545
    iget-object v0, p0, Lcom/example/m6wmr/GiftActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {v0}, Landroid/database/sqlite/SQLiteDatabase;->close()V

    .line 547
    :cond_1
    iget-object v0, p0, Lcom/example/m6wmr/GiftActivity;->cursor:Landroid/database/Cursor;

    if-eqz v0, :cond_2

    .line 548
    iget-object v0, p0, Lcom/example/m6wmr/GiftActivity;->cursor:Landroid/database/Cursor;

    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    .line 551
    :cond_2
    return-void
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 3
    .param p1, "keyCode"    # I
    .param p2, "event"    # Landroid/view/KeyEvent;

    .prologue
    const/4 v2, 0x0

    .line 555
    const/4 v1, 0x4

    if-ne p1, v1, :cond_0

    invoke-virtual {p2}, Landroid/view/KeyEvent;->getRepeatCount()I

    move-result v1

    if-nez v1, :cond_0

    .line 556
    iget v0, p0, Lcom/example/m6wmr/GiftActivity;->goint:I

    .line 557
    .local v0, "checkgo":I
    const/4 v1, 0x1

    if-ne v0, v1, :cond_1

    .line 558
    invoke-virtual {p0}, Lcom/example/m6wmr/GiftActivity;->loadgiftdata()V

    .line 559
    iput v2, p0, Lcom/example/m6wmr/GiftActivity;->goint:I

    .line 566
    .end local v0    # "checkgo":I
    :cond_0
    :goto_0
    return v2

    .line 562
    .restart local v0    # "checkgo":I
    :cond_1
    invoke-virtual {p0}, Lcom/example/m6wmr/GiftActivity;->finish()V

    goto :goto_0
.end method

.method public onStart()V
    .locals 2

    .prologue
    .line 526
    iget v0, p0, Lcom/example/m6wmr/GiftActivity;->goint:I

    .line 527
    .local v0, "checkgo":I
    const/4 v1, 0x1

    if-ne v0, v1, :cond_0

    .line 529
    invoke-virtual {p0}, Lcom/example/m6wmr/GiftActivity;->selectonegiftdata()V

    .line 533
    :goto_0
    invoke-super {p0}, Landroid/app/Activity;->onStart()V

    .line 534
    return-void

    .line 531
    :cond_0
    invoke-virtual {p0}, Lcom/example/m6wmr/GiftActivity;->getShopSource()Z

    goto :goto_0
.end method

.method public selectonegiftdata()V
    .locals 13

    .prologue
    const/4 v12, 0x0

    .line 229
    iget-object v10, p0, Lcom/example/m6wmr/GiftActivity;->publayout:Landroid/widget/LinearLayout;

    invoke-virtual {v10}, Landroid/widget/LinearLayout;->removeAllViews()V

    .line 230
    iget-object v10, p0, Lcom/example/m6wmr/GiftActivity;->mcontext:Landroid/content/Context;

    const v11, 0x7f030064

    invoke-static {v10, v11, v12}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v7

    .line 232
    .local v7, "tempview":Landroid/view/View;
    const v10, 0x7f0c0260

    invoke-virtual {v7, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Landroid/widget/TextView;

    .line 233
    .local v5, "mygifttitle":Landroid/widget/TextView;
    iget-object v10, p0, Lcom/example/m6wmr/GiftActivity;->nowgiftname:Ljava/lang/String;

    invoke-virtual {v5, v10}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 236
    const v10, 0x7f0c0263

    invoke-virtual {v7, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v9

    check-cast v9, Landroid/widget/ImageView;

    .line 237
    .local v9, "upbtn":Landroid/widget/ImageView;
    const v10, 0x7f0c0261

    invoke-virtual {v7, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    .line 238
    .local v2, "downbtn":Landroid/widget/ImageView;
    new-instance v10, Lcom/example/m6wmr/GiftActivity$3;

    invoke-direct {v10, p0}, Lcom/example/m6wmr/GiftActivity$3;-><init>(Lcom/example/m6wmr/GiftActivity;)V

    invoke-virtual {v9, v10}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 262
    new-instance v10, Lcom/example/m6wmr/GiftActivity$4;

    invoke-direct {v10, p0}, Lcom/example/m6wmr/GiftActivity$4;-><init>(Lcom/example/m6wmr/GiftActivity;)V

    invoke-virtual {v2, v10}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 284
    const v10, 0x7f0c022d

    invoke-virtual {v7, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/ImageView;

    .line 285
    .local v3, "gobtn":Landroid/widget/ImageView;
    new-instance v10, Lcom/example/m6wmr/GiftActivity$5;

    invoke-direct {v10, p0}, Lcom/example/m6wmr/GiftActivity$5;-><init>(Lcom/example/m6wmr/GiftActivity;)V

    invoke-virtual {v3, v10}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 297
    iget-object v10, p0, Lcom/example/m6wmr/GiftActivity;->helper:Ldbclass/DBOpenHelper;

    invoke-virtual {v10}, Ldbclass/DBOpenHelper;->getReadableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v10

    .line 298
    const-string v11, "select * from address where is_default = 1"

    .line 297
    invoke-virtual {v10, v11, v12}, Landroid/database/sqlite/SQLiteDatabase;->rawQuery(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v10

    iput-object v10, p0, Lcom/example/m6wmr/GiftActivity;->cursor:Landroid/database/Cursor;

    .line 299
    iget-object v10, p0, Lcom/example/m6wmr/GiftActivity;->cursor:Landroid/database/Cursor;

    if-eqz v10, :cond_1

    .line 300
    :goto_0
    iget-object v10, p0, Lcom/example/m6wmr/GiftActivity;->cursor:Landroid/database/Cursor;

    invoke-interface {v10}, Landroid/database/Cursor;->moveToNext()Z

    move-result v10

    if-nez v10, :cond_0

    .line 316
    :goto_1
    const v10, 0x7f0c0219

    invoke-virtual {v7, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v8

    check-cast v8, Landroid/widget/TextView;

    .line 317
    .local v8, "tianjia":Landroid/widget/TextView;
    new-instance v10, Lcom/example/m6wmr/GiftActivity$6;

    invoke-direct {v10, p0}, Lcom/example/m6wmr/GiftActivity$6;-><init>(Lcom/example/m6wmr/GiftActivity;)V

    invoke-virtual {v8, v10}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 339
    iget-object v10, p0, Lcom/example/m6wmr/GiftActivity;->publayout:Landroid/widget/LinearLayout;

    invoke-virtual {v10, v7}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 340
    return-void

    .line 303
    .end local v8    # "tianjia":Landroid/widget/TextView;
    :cond_0
    const v10, 0x7f0c0224

    invoke-virtual {v7, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v6

    check-cast v6, Landroid/widget/EditText;

    .line 304
    .local v6, "phone":Landroid/widget/EditText;
    const v10, 0x7f0c0225

    invoke-virtual {v7, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    .line 305
    .local v0, "address":Landroid/widget/EditText;
    const v10, 0x7f0c0226

    invoke-virtual {v7, v10}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    .line 306
    .local v1, "contactname":Landroid/widget/EditText;
    iget-object v10, p0, Lcom/example/m6wmr/GiftActivity;->cursor:Landroid/database/Cursor;

    iget-object v11, p0, Lcom/example/m6wmr/GiftActivity;->cursor:Landroid/database/Cursor;

    const-string v12, "phone"

    invoke-interface {v11, v12}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v11

    invoke-interface {v10, v11}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v6, v10}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 307
    iget-object v10, p0, Lcom/example/m6wmr/GiftActivity;->cursor:Landroid/database/Cursor;

    iget-object v11, p0, Lcom/example/m6wmr/GiftActivity;->cursor:Landroid/database/Cursor;

    const-string v12, "address"

    invoke-interface {v11, v12}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v11

    invoke-interface {v10, v11}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v0, v10}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 308
    iget-object v10, p0, Lcom/example/m6wmr/GiftActivity;->cursor:Landroid/database/Cursor;

    iget-object v11, p0, Lcom/example/m6wmr/GiftActivity;->cursor:Landroid/database/Cursor;

    const-string v12, "contactname"

    invoke-interface {v11, v12}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v11

    invoke-interface {v10, v11}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v1, v10}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0

    .line 312
    .end local v0    # "address":Landroid/widget/EditText;
    .end local v1    # "contactname":Landroid/widget/EditText;
    .end local v6    # "phone":Landroid/widget/EditText;
    :cond_1
    new-instance v4, Landroid/content/Intent;

    invoke-direct {v4}, Landroid/content/Intent;-><init>()V

    .line 313
    .local v4, "intent":Landroid/content/Intent;
    const-class v10, Lcom/example/m6wmr/SelectAddressActivity;

    invoke-virtual {v4, p0, v10}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    .line 314
    invoke-virtual {p0, v4}, Lcom/example/m6wmr/GiftActivity;->startActivity(Landroid/content/Intent;)V

    goto :goto_1
.end method

.method public waitlogin()V
    .locals 4

    .prologue
    .line 162
    iget-object v1, p0, Lcom/example/m6wmr/GiftActivity;->publayout:Landroid/widget/LinearLayout;

    invoke-virtual {v1}, Landroid/widget/LinearLayout;->removeAllViews()V

    .line 163
    iget-object v1, p0, Lcom/example/m6wmr/GiftActivity;->mcontext:Landroid/content/Context;

    const v2, 0x7f03009e

    const/4 v3, 0x0

    invoke-static {v1, v2, v3}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    iput-object v1, p0, Lcom/example/m6wmr/GiftActivity;->waitLoginView:Landroid/view/View;

    .line 164
    iget-object v1, p0, Lcom/example/m6wmr/GiftActivity;->waitLoginView:Landroid/view/View;

    const v2, 0x7f0c0301

    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    .line 165
    .local v0, "waitlogin":Landroid/widget/TextView;
    new-instance v1, Lcom/example/m6wmr/GiftActivity$2;

    invoke-direct {v1, p0}, Lcom/example/m6wmr/GiftActivity$2;-><init>(Lcom/example/m6wmr/GiftActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 176
    iget-object v1, p0, Lcom/example/m6wmr/GiftActivity;->publayout:Landroid/widget/LinearLayout;

    iget-object v2, p0, Lcom/example/m6wmr/GiftActivity;->waitLoginView:Landroid/view/View;

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    .line 179
    return-void
.end method
